-- GENERATED SPELL FOR [Coilfang Hate-Screamer] --


function spell0_21339(pUnit, Event) --@Silence,n/a--
pUnit:FullCastSpellOnTarget(38491,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21339', 5258, 1)
end

function spell1_21339(pUnit, Event) --@Sonic Scream,n/a--
pUnit:FullCastSpellOnTarget(38496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21339', 628, 1)
end

function Sorts_21339(pUnit, Event)
local choix_sorts_21339 = math.random(0, 1)
if choix_sorts_21339 == 0 then
pUnit:RegisterEvent('spell0_21339', 1, 1)
end
if choix_sorts_21339 == 1 then
pUnit:RegisterEvent('spell1_21339', 1, 1)
end
end

function mob21339_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21339', math.random(1500, 3000), 1)
end

function mob21339_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21339_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21339_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21339, 1, 'mob21339_Action')
RegisterUnitEvent(21339, 2, 'mob21339_Leave')
RegisterUnitEvent(21339, 3, 'mob21339_Kill')
RegisterUnitEvent(21339, 4, 'mob21339_Die')
